home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 185 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: anhaeupl@late.e-technik.uni-erlangen.de (Bernd Anhaeupl)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: FW: FW: Inherent C++ problem?
  5. Date: 26 Jan 1996 16:48:16 GMT
  6. Organization: LATE, Uni. Erlangen-Nuernberg, Germany
  7. Approved: clamage@eng.sun.com (comp.std.c++)
  8. Message-ID: <4eb005$46s@rznews.rrze.uni-erlangen.de>
  9. References: <01BAEB16.3DF53D40@dino.int.com>
  10. NNTP-Posting-Host: taumet.eng.sun.com
  11. Content-Type: text
  12. X-Nntp-Posting-Host: late2.e-technik.uni-erlangen.de
  13. In-Reply-To: Eugene Lazutkin's message of 26 Jan 96 04:53:37 GMT
  14. Content-Length: 1185
  15. X-Lines: 40
  16. Originator: clamage@taumet
  17.  
  18. In article <01BAEB16.3DF53D40@dino.int.com> Eugene Lazutkin <eugene@int.com> writes:
  19.  
  20.    > Here is part of the relevent section in the draft standard:
  21.    > 
  22.    > 12.2 Temporary objects
  23.    > While evaluating an expression, it might be necessary or convenient
  24.    > for an implementation to generate temporary objects to hold values
  25.    > resulting from the evaluation of the expression's subexpressions.
  26.    > During this evaluation, precisely when such temporaries are
  27.    > introduced is unspecified.
  28.  
  29.    Well, I guess it is exactly the "not explicit enough" thing, at least
  30.    when related to the case I described:
  31.  
  32.    Foo    foo()
  33.    {
  34.        return Foo( ...... );
  35.    }
  36.  
  37.    Foo( ..... ) is a full expression rather than subexpression. So, is the
  38.    implementation _required_ to instantiate _this_ temporary under the
  39.    current standard?
  40.  
  41. What do you mean with _this_ temporary?
  42.  
  43.     a) return value:   i.e. 
  44.  
  45.              Foo return_value ( ..... );
  46.  
  47. or
  48.     b) additional temporary:
  49.  
  50.              Foo tmp( ......);
  51.              
  52.              Foo return_value(tmp);
  53. -- 
  54. Bernd Anhaeupl            Tel.:  +49 9131 857787
  55. LATE - Uni Erlangen            
  56. Cauerstr. 7            Email: anhaeupl@late.e-technik.uni-erlangen.de
  57. 91058 Erlangen
  58.  
  59. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  60.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  61.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  62.  
  63.